﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/*
 * @Author Wujiajun
 * @Data 2021/2/9
 * @Description 维护所有的XXXManager，作为唯一入口
 */


public class Manager : MonoBehaviour
{
    //获取LuaManager和ResourceManager,向外提供

    private static ResourceManager m_resourceManager;
    private static LuaManager      m_luaManager;
    private static UIManager       m_uiManager;
    private static EntityManager   m_entityManager;
    private static MySceneManager  m_mySceneManager;

    public static ResourceManager ResourceManager
    {
        get { return m_resourceManager; }
    }
    public static LuaManager      LuaManager
    {
        get { return m_luaManager; }
    }
    public static UIManager       UIManager
    {
        get { return m_uiManager; }
    }
    public static EntityManager   EntityManager
    {
        get { return m_entityManager; }
    }
    public static MySceneManager  MySceneManager
    {
        get { return m_mySceneManager; }
    }


    private void Awake()
    {
        m_resourceManager = this.gameObject.AddComponent<ResourceManager>();
        m_luaManager      = this.gameObject.AddComponent<LuaManager>();
        m_uiManager       = this.gameObject.AddComponent<UIManager>();
        m_entityManager   = this.gameObject.AddComponent<EntityManager>();
        m_mySceneManager  = this.gameObject.AddComponent<MySceneManager>();

    }

}
